package edu.gatech.cs2340.spring2012.team38;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;


public class Login_Page
{
	/**
	 * Creates a new user in the database
	 * @param uname the string that represents the user name
	 * @param passw a string representing the password that will be associated with the username 
	 **/
	public static void createNewUser(String uname, String passw, SQLiteDatabase db)
	{
		//don't know the table name
		String insertUser = "INSERT INTO users (Username, Password) VALUES ("+ uname + ","+passw+")";
		Cursor resultCur = db.rawQuery(insertUser, null);
		resultCur.moveToFirst();
	}
	
	public static void loginUser(String uname, String passw, Search s)
	{
		if (s.searchForUser(uname, passw) == 1)
		{
			System.out.println(TS_System.notifyUser("Login Successful"));
		}
	}
}